
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO


CREATE PROCEDURE [dbo].[usp_ShowRecruitmentPublic]
	(
	@param_type NVARCHAR(50)
	)
AS
	/* SET NOCOUNT ON */

	IF @param_type='全部'
		BEGIN
			Select * from dbo.JOL_Recruitment 
			WHERE state = 1
			ORDER BY end_time desc, start_time asc
		 END
	 ELSE
		 BEGIN
			Select * from dbo.JOL_Recruitment 
			WHERE state = 1 AND type= @param_type
			ORDER BY end_time desc, start_time asc
		 END

	RETURN


GO
